import { ENV } from '@/constants/common';
import { FLD } from '@/constants/business';

// 环境标识
const { env } = process.env.ENV;
const fld = FLD[env];

export const isDevelopment = env !== 'prod';

// 系统角色
const systemCode = 'patient';
const config = {
  isDevelopment,
  fld,
  env,
  systemCode,
  webviewDomain: {
    // 预览域名配置
    [ENV.DEV]: 'http://localhost:5010/hospital',
    [ENV.TEST]: 'https://xxx/hospital',
    [ENV.UAT]: 'https://xxx/hospital',
    [ENV.PROD]: 'https://xxx/hospital'
  }[env.toUpperCase()],
  systemCodeText: '患者端',
  COOKIE: `${systemCode}_token`,
  xltdataUrl: `https://datasink.heals.net.cn/sa?project=${env.toUpperCase() === ENV.PROD ? 'production' : 'default'
    }`,
  areaJsonURL: 'https://xxxx.com/oss/staticFile/json/areaData.json'
};

export default config;
